package weeklyreport

import java.text.SimpleDateFormat

class Issue {
	Date date
	String imNumber
	String depart
	String description
	String reason
	String status
	User solveMan
	
	static belongsTo = [solveMan:User]

    static constraints = {
		date()
		imNumber(unique:true)
		depart(nullable:true)
		description(nullable:true)
		reason(nullable:true)
		status(inList:["已解决","未解决"])
		solveMan(validator:{it.role == "user"})
    }
	
	static mapping = {
		sort "date"
	}
	
	String toString() {
		imNumber
	}
}
